package com.docted.design.pattern.singleton;

import com.docted.design.pattern.singleton.lazy.LazyThree;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * @author DoCted
 * @since v1.0 2018/3/7
 */
public class LazyThreeTest {

    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {


        Class clazz = LazyThree.class;

//        Constructor[] constructors = clazz.getDeclaredConstructors();
//        for (Constructor constructor : constructors) {
//            constructor.setAccessible(true);
//            constructor.newInstance();
//
//        }

        Constructor constructor = clazz.getDeclaredConstructor();
        constructor.setAccessible(true);
        Object o1 = constructor.newInstance();
        Object o2 = constructor.newInstance();


    }
}
